home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
029a
/
lite411q.zip
/
LDEMO3.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-07-25
|
5KB
|
147 lines
'============================================================================
'
' LDEMO3.BAS - Window Demo #3
' ProWindows(tm) LITE 4.00
' (c) Copyright 1988-1991 DSE Software Publishing
'
'==========================================================================
'
' To make use of this demonstration program, you must use the library
' created with MOUSE.BAT and then you must load BASIC EXACTLY as
' follows:
'
' QB LDEMO3 /AH /L LITEDEMO (for QuickBASIC)
' QBX LDEMO3 /AH /EA /L LITEDEMO (for BASIC PDS 7)
'
'==========================================================================
REM $DYNAMIC
DEFINT A-Z
' =======================================================================
' Additional INCLUDE modules should follow
' =======================================================================
REM $INCLUDE: 'LITE.bi'
CLEAR , , 4096 ' Set aside additional stack space
' =======================================================================
' These constants should be defined in ALL applications.
' =======================================================================
CONST WINMEMSIZE% = 8191 ' Window memory, used by 'VirMem%()'
CONST SCRNMEMSIZE% = 4096 ' Screen storage memory, used by 'scrn%()'
CONST MAXWINDOWS% = 30 ' maximum number of windows
' =======================================================================
' This must be INCLUDE'ed after the CONSTants are defined
' =======================================================================
DIM SHARED VirMem(WINMEMSIZE) AS INTEGER
DIM SHARED scrn(SCRNMEMSIZE) AS INTEGER
DIM SHARED vcb(MAXWINDOWS) AS vircb
DIM SHARED wcb(MAXWINDOWS) AS wincb
DIM SHARED wcbndx(MAXWINDOWS) AS INTEGER
' =======================================================================
' Program initialization code
' =======================================================================
ReCycleMode 1 ' enable "Video Recycling" saves 24K
InitPro ' initialize ProWindows
MouseInstalled = CheckMouse(buttons) ' install the mouse driver
MouseCursorOn
MouseCursorOn
' =======================================================================
' Your code goes here
' =======================================================================
' =======================================================================
' Remove next two "REM" statements for simulated monochrome mode
' =======================================================================
REM SetBWmode ENABLE
REM SetMonitorColor 6 '1 is blue, 2 is green, 6 is amber, etc...
FillScreen 1, 1, 25, 80, attr(0, 1), 176, SNOW
FillScreen 25, 1, 1, 23, 79, 32, SNOW
MainMenu:
QuickKey 1, CHR$(0) + CHR$(60) ' F2
QuickKey 2, CHR$(0) + CHR$(61) ' F3
QuickKey 3, CHR$(0) + CHR$(62) ' F4
QuickKey 4, CHR$(0) + CHR$(45) ' Alt-X
SetCalendar 0, 25, 2, 79, 1
SetClock 0, 25, 15, 79, 1
GlobalOptions = SELECTABLE + DRAGBAR + OFFBUTTON + AUTOCLOSE + RESIZEBUTTON
Notice
OpenWindow 1, 15, 37, attr(0, 7), 1, 1, 1, GlobalOptions
OpenWindow 2, 15, 37, attr(7, 1), 1, 1, 1, GlobalOptions
OpenWindow 3, 15, 37, attr(15, 4), 1, 1, 1, GlobalOptions
OpenWindow 4, 15, 37, attr(15, 2), 1, 1, 1, GlobalOptions
OpenWindow 5, 15, 37, attr(15, 5), 1, 1, 1, GlobalOptions
FOR x = 1 TO 5
setWindow x
wcprint 6, "Maipulate me with a mouse!"
cwcprint 7, 30, "ALT-X to Quit"
titleWindow 4, " Window" + STR$(x) + " "
NEXT
DisplayWindow 1, 2, 10, 15, 37
DisplayWindow 2, 4, 15, 15, 37
DisplayWindow 3, 6, 20, 15, 37
DisplayWindow 4, 8, 25, 15, 37
DisplayWindow 5, 10, 30, 15, 37
DO
SELECT CASE GetEvent(0)
CASE 15, 16
GOTO quitProg
CASE 16 ' <ESC> was pressed
END
CASE 19
GOSUB QuickKeyEvent
CASE ELSE
END SELECT
LOOP
QuickKeyEvent:
QuickEventNo = GetEvent(19)
SELECT CASE QuickEventNo
CASE 1, 2, 3
PopWindow 0, 0, 5, 40, 112, 1, 1, 1
wcprint 2, "You pressed Quick Key #" + STR$(QuickEventNo)
SLEEP 1
RemoveWindow
CASE 4
quitProg: FOR x = 5 TO 1 STEP -1
CloseWindow x
NEXT
MouseCursorOff
CLS
PRINT "Thanks for running me!"
END
CASE ELSE
END SELECT
RETURN